home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / e / easy_patch / easypatchv1.23cra.lha / EasyPatch123a / Install / Install < prev    next >
Encoding:
Text File  |  1997-02-10  |  6.5 KB  |  428 lines

  1. ;EasyPatch Installation Script
  2. ;$VER: EasyInstall 1.22
  3.  
  4. (set iver (/ @installer-version 65536))
  5. (set irev (- @installer-version (* ver 65536)))
  6.  
  7.  
  8. (set #ver "1.23")
  9. (set #nver "123")
  10.  
  11. (set #vc 0)
  12.  
  13. ;/// ***** English
  14.  
  15.  
  16. (set #Welcome        "Welcome to EasyPatch %s\nPrepare your requesters to be destroyed!")
  17.  
  18. (set #Voice         "-s180 Prepare your requesters to be destroyed!")
  19.  
  20. (set #Voice_End        "-s180 EasyPatch has been succesfuly installed.")
  21.  
  22. (set #Voice_Upgrade    "-s180 Upgrading to")
  23.  
  24. (set #wrongOS          "EasyPatch needs at least OS2.04 to run\n")
  25.  
  26. (set #EasyPatchDir  "Where I should install EasyPatch and his support utilities?\n(A directory will be created)\n")
  27.  
  28. (set #EasyUtilDir   "Where I should install the\nsupport utilities?\n")
  29.  
  30. (set #GuideDir       "Where I should install the\nAmigaGuide documentation?\n")
  31.  
  32. (set #CpuChoice     "Please, select your processor!\n")
  33.  
  34. (set #CreateCpu     "Creating 68%s version of EasyPatch")
  35.  
  36. (set #Wait             "Please wait\n")
  37.  
  38. (set #Done             "\nEasyPatch has been succesfuly installed in\n %s.\n\n")
  39.  
  40. (set #Aminet        "You are going to install the Aminet version of EasyPatch.\nYou can obtain the full version on EasyPatch homepage.")
  41.  
  42. (set #BootUp        "Should be EasyPatch automatically runned at bootup?")
  43.  
  44. ;/// ***** Italiano
  45.  
  46. (IF (= @language "italiano")
  47. (
  48.  
  49. (set #Welcome        "Benvenuto in EasyPatch %s\nPrepara i tuoi requesters ad essere distrutti!")
  50.  
  51. (set #wrongOS          "EasyPatch necessita del Sistema Operativo 2.04\n per funzionare.\n")
  52.  
  53. (set #EasyPatchDir  "Dove devo installare EasyPatch e le sue utility di supporto?\n (Una directory verra' creata)\n")
  54.  
  55. (set #EasyUtilDir   "Dove devo installare le utility\ndi supporto?\n")
  56.  
  57. (set #GuideDir       "Dove devo installare la \ndocumentazione AmigaGuide?\n\n")
  58.  
  59. (set #CpuChoice     "Seleziona il tuo processore\n")
  60.  
  61. (set #CreateCpu     "Creo l'eseguibile di EasyPatch\n ottimizzato per 68%s")
  62.  
  63. (set #Wait             "Attendere prego :-)\n")
  64.  
  65. (set #Done             "\nEasyPatch รจ stato installato con successo in\n %s.\n\n")
  66.  
  67. (set #Aminet        "Stai per installare la versione Aminet di EasyPatch.\nPotrai trovare la versione completa sulla homepage di EasyPatch.")
  68.  
  69. (set #BootUp        "Devo caricare EasyPatch automaticamente al bootup?")
  70.  
  71. )
  72. )
  73.  
  74.  
  75. ;----------------------------------------------------------------------------
  76.  
  77. ;/// Checking environment
  78. (set OS_ver (getversion "exec.library" (resident)))
  79. (if (< OS_ver (* 37 65536)) (abort #wrongOS))
  80.  
  81.  
  82. ;----------------------------------------------------------------------------
  83.  
  84.  
  85. (complete 0)
  86.  
  87.  
  88. (if (exists("SYS:Utilities/Say"))
  89. (
  90.     (run (cat "Run <>NIL: SYS:Utilities/Say " #Voice))
  91.     (set #vc 1)
  92. )
  93. )
  94.  
  95. (message (#Welcome #ver))
  96.  
  97.  
  98.  
  99.  
  100. (if(exists("/AMINET-VERSION.txt"))
  101.     (message #Aminet)
  102. )
  103.  
  104.  
  105. (complete 1)
  106.  
  107.  
  108. (set #EasyPatchDir
  109.     (askdir
  110.         (prompt #EasyPatchDir)
  111.         (newpath)
  112.         (default @default-dest)
  113.         (help @askdir-help)
  114.     )
  115. )
  116.  
  117.  
  118. (set #EasyIcon #EasyPatchDir)
  119. (set #EasyPatchDir (tackon #EasyPatchDir "EasyPatch"))
  120.  
  121.  
  122. (complete 10)
  123.  
  124.  
  125. (set #opt 
  126.     (askbool
  127.         (prompt #BootUp)
  128.         (default 1)
  129.         (help @askoptions-help)
  130.     )
  131. )
  132.  
  133.  
  134. (set #EasyGuideDir (tackon #EasyPatchDir "Docs"))
  135.  
  136.  
  137. (complete 20)
  138.  
  139. ;(set #EasyGuideDir
  140. ;    (askdir
  141. ;        (prompt #GuideDir)
  142. ;        (default #EasyGuideDir)
  143. ;        (newpath)
  144. ;        (help @askdir-help)
  145. ;    )
  146. ;)
  147.  
  148. (set #EasyGuideDir (tackon #EasyPatchDir "Docs"))
  149.  
  150. (debug "Destination dir      : " #EasyPatchDir)
  151. (debug "Destination guide dir: " #EasyGuideDir)
  152.  
  153.  
  154. (complete 25)
  155.  
  156.  
  157. (set #defcpu 
  158.  
  159.     (database "cpu")
  160. )
  161.  
  162. (set #cpun
  163.     (substr #defcpu 3 1)
  164. )
  165.  
  166.  
  167. (if (= #cpun 0)
  168.  
  169.     (set #cpud 0)
  170. )
  171.  
  172. (if (= #cpun 1)
  173.  
  174.     (set #cpud 0)
  175. )
  176.  
  177. (if (= #cpun 2)
  178.  
  179.     (set #cpud 1)
  180. )
  181.  
  182. (if (= #cpun 3)
  183.  
  184.     (set #cpud 2)
  185. )
  186.  
  187. (if (= #cpun 4)
  188.  
  189.     (set #cpud 3)
  190. )
  191.  
  192. (if (= #cpun 6)
  193.  
  194.     (set #cpud 4)
  195. )
  196.  
  197. (complete 30)
  198.  
  199.  
  200.  
  201. (set #CPU
  202.  
  203.         (askchoice 
  204.                 (prompt #CpuChoice)
  205.                 (choices "68000" "68020" "68030" "68040" "68060")
  206.                 (default #cpud)
  207.                 (help @askchoice-help)
  208.  
  209.         )
  210. )
  211.  
  212. (complete 40)
  213.  
  214.  
  215. (set #cpus (select #CPU "68000" "68020" "68030" "68040" "68060"))
  216.  
  217. (debug "Processor            : " #cpus)
  218.  
  219.  
  220. (set #cpup 
  221.     (substr #cpus 2 3
  222.     )
  223. )
  224.  
  225. (complete 50)
  226.  
  227.  
  228.  
  229. (if (= #opt 1)
  230. (
  231.     (set #EasyBoot "SYS:WBStartup")
  232.  
  233.     (complete 55)
  234.  
  235.     ;WBStartup+ Support
  236.  
  237.     (if (AND (>= iver 42) (>= irev 12))
  238.     (
  239.         (if(exists("SYS:WBStartup/WBStartup+"))
  240.         (
  241.             (iconinfo
  242.                 (prompt #Wait)
  243.                 (dest "SYS:WBStartup/WBStartup+")
  244.                 (gettooltype "ENABLEDPATH" "#EasyBoot")
  245.             )
  246.             (debug "Destination of EasyPatch: " #EasyBoot)
  247.         )
  248.         )
  249.     )
  250.     )
  251.  
  252.     (complete 60)
  253.  
  254.     (if(not(exists (tackon #EasyBoot "EasyPatch.info")))
  255.     (
  256.         (copyfiles
  257.             (prompt #Wait)
  258.             (source "/EasyPatch.info")
  259.             (dest   #EasyBoot)
  260.         )    
  261.     )
  262.     )
  263.  
  264.     (complete 65)
  265.  
  266.  
  267.     (copyfiles
  268.         (prompt #Wait)
  269.         (source "/EasyPatch")
  270.         (dest   #EasyBoot)
  271.     )    
  272.  
  273.     (set #ins #EasyBoot)
  274. )
  275. ;else
  276. (
  277.     (if(not(exists (tackon #EasyPatchDir "EasyPatch.info")))
  278.     (
  279.         (copyfiles
  280.             (prompt #Wait)
  281.             (source "/EasyPatch.info")
  282.             (dest   #EasyPatchDir)
  283.         )    
  284.     )
  285.     )
  286.  
  287.     (complete 55)
  288.  
  289.  
  290.     (copyfiles
  291.         (prompt #Wait)
  292.         (source "/EasyPatch")
  293.         (dest   #EasyPatchDir)
  294.     )    
  295.  
  296.     (set #ins #EasyPatchDir)
  297.  
  298.     (complete 60)
  299.  
  300. )
  301. )
  302.  
  303.  
  304. (complete 70)
  305.  
  306.  
  307. (if (<> cpup "000")
  308. (
  309.     (if (= #vc 1)
  310.         (run (cat "Run <>NIL: SYS:Utilities/Say " (cat #Voice_Upgrade " " #cpus ".")))
  311.     )
  312.  
  313.     (working (#CreateCpu #cpup))
  314.  
  315.     (run ("spatch -oT:EasyPatch -p/Pch/EP%s.pch /EasyPatch" #cpup))
  316.  
  317.     (complete 75)
  318.  
  319.     (copyfiles
  320.         (prompt #Wait)
  321.         (source "T:EasyPatch")
  322.         (dest   #ins)
  323.     )
  324.  
  325.     (delete "T:EasyPatch")
  326. )
  327. )
  328.  
  329.  
  330.  
  331. (complete 80)
  332.  
  333.  
  334. (copyfiles
  335.     (prompt #Wait)
  336.     (source (cat "//EasyPatch" #nver ".info"))
  337.     (newname "EasyPatch.info")
  338.     (dest   #EasyIcon)
  339. )
  340.  
  341.  
  342. (copyfiles
  343.     (prompt #Wait)
  344.     (source "/EasyList")
  345.     (infos)
  346.     (dest   #EasyPatchDir)
  347. )
  348.  
  349. (complete 83)
  350.  
  351. (copyfiles
  352.     (prompt #Wait)
  353.     (source "/EasyStat")
  354.     (infos)
  355.     (dest   #EasyPatchDir)
  356. )
  357.  
  358. (complete 86)
  359.  
  360. (copyfiles
  361.     (prompt #Wait)
  362.     (source "/Configuration/EasyConfig")
  363.     (dest   #EasyPatchDir)
  364. )
  365.  
  366. (complete 89)
  367.  
  368. (copyfiles
  369.     (prompt #Wait)
  370.     (source "/Configuration/Config")
  371.     (dest   #EasyPatchDir)
  372. )
  373.  
  374. (complete 92)
  375.  
  376. (copyfiles
  377.     (prompt #Wait)
  378.     (source (cat "/Configuration/" @language ".info"))
  379.     (newname "EasyConfig.info")
  380.     (dest   #EasyPatchDir)
  381. )
  382.  
  383. (tooltype 
  384.     (prompt #Wait)
  385.     (dest "/EasyConfig")
  386.     (noposition)
  387. )
  388.  
  389. (complete 95)
  390.  
  391.  
  392. (copyfiles
  393.     (prompt #Wait)
  394.     (infos)
  395.     (source "/Docs")
  396.     (all)
  397.     (dest   #EasyGuideDir)
  398. )
  399.  
  400. (copyfiles
  401.     (prompt #Wait)
  402.     (source "/Docs.info")
  403.     (dest   #EasyPatchDir)
  404. )
  405.  
  406.  
  407. (if (= #vc 1)
  408.     (run (cat "Run <>NIL: SYS:Utilities/Say " #Voice_End))
  409. )
  410.  
  411.  
  412.  
  413. (run "AmigaGuide /Docs/EasyPatch.guide")
  414.  
  415. (complete 100)
  416.  
  417.  
  418. (set @default-dest #EasyPatchDir)
  419.  
  420.  
  421. ;(message (#Done #EasyPatchDir))
  422.  
  423.  
  424.  
  425. (exit)
  426.  
  427.  
  428.